package paintObjects;

import interfaces.IPaintable;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.ArrayList;

public class Filling implements IPaintable {
	
	Color color;
	
	ArrayList<Pixel> pixels;

	public Filling(Color color) {

		this.color = color;
		
		pixels = new ArrayList<>();
	}

	public Color getColor() {
		return color;
	}

	public ArrayList<Pixel> getPixels() {
		
		return pixels;
	}
	
	public void addPixel(Integer x, Integer y) {
		
		pixels.add(new Pixel(x, y));
		
	}

	@Override
	public void painting(Graphics2D g, boolean tmp) {
		
		g.setStroke(new BasicStroke(0));
		g.setPaint(color);
		
		for (Pixel pixel : pixels) {
			g.drawLine(pixel.getX(), pixel.getY(), pixel.getX(), pixel.getY());
		}
		
	}

	@Override
	public void update(int x, int y) {
		// TODO Auto-generated method stub
		
	}

}
